import { ref } from "vue"

function useCounter() {
  const num = ref(10);
  const add = () => {
    num.value += 2
  }
  const sub = () => {
    num.value -= 2
  }

  return {
    num,
    add,
    sub
  }
}

export default useCounter